
package org.movee.spring.data.hugegraph.repository.query;

import org.movee.spring.data.hugegraph.mapping.HugePersistentEntity;
import org.springframework.util.Assert;

public class SimpleHugeEntityMetadata<T> implements HugeEntityMetadata<T> {

    private final HugePersistentEntity<?> entity;

    private final Class<T> type;

    public SimpleHugeEntityMetadata(Class<T> type, HugePersistentEntity<?> entity) {
        Assert.notNull(type, "Type must not be null");
        Assert.notNull(entity, "Collection entity must not be null or empty");

        this.type = type;
        this.entity = entity;
    }

    @Override
    public Class<T> getJavaType() {
        return this.type;
    }
}
